﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;

namespace RegularExpression
{
   class Program
   {
      static void Main(string[] args)
      {
         try
         {
            INIHelper helper = new INIHelper();
            helper.LoadINI("config.ini");
            Console.WriteLine(helper.GetValueByName("DBName"));
            Console.WriteLine(helper.GetValueByName("UserName"));
            Console.WriteLine(helper.GetValueByName("PassWord"));
            Console.WriteLine(helper.GetValueByName("Version"));
            helper.SetValueByName("PassWord", "root");
            helper.SaveINI();
         }
         catch (Exception ex)
         {
            Console.WriteLine(ex.Message);
         }

         Console.Read();
      }
   }
}
